import jiekou from './jiekou.js'
const shar = (opt) => {
	uni.share({
		provider: "weixin",
		scene: opt.scene,
		type:  opt.type || 0,
		href: opt.href,
		title: opt.title,
		summary: opt.summary,
		imageUrl:opt.imageUrl,
		success: function (res) {
			console.log("success:" + JSON.stringify(res));
			if(opt.state==1){
				jiekou.dianzan({					content: '',					pid: '',					type: 2,					user_dynamic_id: opt.id,					success: function(res) {						console.log('分享成功')					}				})
			}
		},
		fail: function (err) {
			console.log("fail:" + JSON.stringify(err));
		}
	});
}
export default {
	shar       //分享
}
